<template>
	<view class="">
		<view class="order">
			<view class="top">
				<view class="left">
					<!-- <u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon> -->
					<image :src="item.appBusinessImg" style="width: 46rpx;height: 46rpx;" mode=""></image>
					<view class="store">{{ item.appBusinessName }}</view>
					<u-icon v-if="false" name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
				</view>
				<view v-if="false" class="right">{{ '交易失败' }}</view>
			</view>
			<view class="item" style="background-color: #F0F0F0;">
				<view class="left">
					<image :src="item.imgUrl" mode="aspectFill">
					</image>
				</view>
				<view class="content">
					<view class="title u-line-2">{{ item.title }}</view>
					<view class="type" v-for="sku in item.specList">{{ sku.name }}:{{sku.attrName}}</view>
					<view class="right">
						<view class="">
							{{ '¥'+item.skuPrice + '/件' }}
						</view>
						<view class="post" v-if="item.post==1">
							包邮
						</view>
						<view class="post" v-else>
							邮费:{{item.postAge}}
							<!-- "post": 1, -->
							<!-- "postAge": 0, -->
						</view>
					</view>
				</view>
				<view class="right" v-if="false">
					<view class="price">
						￥{{ '233' }}
						<text class="decimal">.{{ '233' }}</text>
					</view>
					<view class="number">x{{ '123' }}</view>
				</view>
			</view>
			<view class="total" v-if="isTotal">
				总价￥{{ '123' }} 实付款:
				<text class="total-price">
					￥{{ '123' }}.
					<text class="decimal">{{ '123' }}</text>
				</text>
			</view>
			<view class="bottom" v-if="isBottomBtn">
				<view class="btn">
					<u-button shape="circle" size="mini">查看物流</u-button>
				</view>
				<view class="btn">

					<u-button type="primary" shape="circle" size="mini">立即购买</u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: Object,
				default: () => {}
			},
			isTotal: {
				type: Boolean,
				default: false
			},
			isBottomBtn: {
				type: Boolean,
				default: false
			},
		}
	}
</script>

<style scoped lang="scss">
	.order {
		// width: 710rpx;
		width: 100%;
		background-color: #ffffff;
		margin: 16rpx auto;
		border-radius: 20rpx;
		box-sizing: border-box;
		// padding: 20rpx;
		font-size: 28rpx;

		.top {
			padding: 0 20rpx;
			display: flex;
			justify-content: space-between;

			.left {
				display: flex;
				align-items: center;

				.store {
					margin: 0 10rpx;
					font-size: 32rpx;
					font-weight: bold;
				}
			}

			.right {
				color: $u-type-primary;
			}
		}

		.item {
			display: flex;
			margin: 20rpx 0 0;
			width: 100%;
			padding: 20rpx;

			.left {
				margin-right: 20rpx;

				image {
					width: 170rpx;
					height: 170rpx;
					border-radius: 10rpx;
				}
			}

			.content {
				width: 100%;

				.right {
					display: flex;
					justify-content: space-between;
					width: 100%;
					margin-top: 10rpx;
					.post {
						color: $u-type-primary;
					}
				}

				.title {
					font-size: 26rpx;
					color: #101010;
					@include ellipsisMultiline(2)
				}

				.type {
					// margin: 10rpx 0;

					font-size: 24rpx;
					color: $u-tips-color;
				}

				.delivery-time {
					color: $u-type-primary;
					font-size: 24rpx;
				}
			}

			.right {
				margin-left: 10rpx;
				padding-top: 20rpx;
				text-align: right;

				.decimal {
					font-size: 24rpx;
					margin-top: 4rpx;
				}

				.number {
					color: $u-tips-color;
					font-size: 24rpx;
				}
			}
		}

		.total {
			margin-top: 20rpx;
			text-align: right;
			font-size: 24rpx;

			.total-price {
				font-size: 32rpx;
			}
		}

		.bottom {
			display: flex;
			margin-top: 20rpx;
			padding: 0 10rpx;
			justify-content: flex-end;
			align-items: center;
			width: 100%;

			.btn {
				margin-left: 20rpx;
			}
		}
	}
</style>
